# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-functools32
_pkgname=functools32
pkgver=3.2.3_2
pkgrel=3
pkgdesc='Backport of the functools module from Python 3.2.3 for use on 2.7 and PyPy.'
url='https://pypi.org/project/functools32/#files'
arch=('any')
license=('custom:unknown')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-${pkgver//_/-}.tar.gz")
sha512sums=('ad944019f4aefde292b6872bfe06862d01920a2f44adf8740c36ed51d16d879be7638591aaddf9dac4ec83b6f05bbf81972d5f32854abedcce3dde080459f7f7')

build() {
  cd "$_pkgname-${pkgver//_/-}"

  python2 setup.py build
}

package() {
  cd "$_pkgname-${pkgver//_/-}"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

